<?php


namespace App\Http\Controllers\Api\Order;


use App\Http\Controllers\Api\BasicController;
use App\Models\Order\RechargeOption;
use App\Models\Order\RechargeOrder;
use App\Models\OrderAppoint;
use App\Models\SiteCode;
use App\Models\User;
use App\Models\UserFocus;
use App\Models\UserInfo;
use App\Services\Sms;
use Carbon\Carbon;
use GatewayWorker\Lib\Gateway;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Request;
use Jiannei\Response\Laravel\Support\Facades\Response;
use Label84\HoursHelper\Facades\HoursHelper;

class RechargeController extends BasicController
{

    /**
     * @api {post} /msg/check 预约&支付
     * @apiDescription
     * @apiHeader {String} Authorization='Bearer '
     */

    public function options(){
        return Response::success(RechargeOption::all());
    }


    public function place(){

        $id = $this->request->input('id');
        $pay_type = $this->request->input('pay_type');
        $result=(new RechargeOrder())->order($this->uid(),$id,$pay_type);
        return Response::success($result);
    }
}
